package com.haiyangwang1.lesson11;

public class Demo1 {
    public static String method(String[] str,int arrayi){
        for (int i=0;i<str.length;i++){
            if (arrayi==i){
                return str[i];
            }
        }
        return "0";
    }

    public static void main(String[] args) {
        Demo1 demo1=new Demo1();
        String[] str = new String[]{"a","b","c"};
        System.out.println(demo1.method(str,2));
    }
}
